package com.pluser.mq.engine;

import java.io.IOException;

import com.ibm.mq.MQException;
import com.ibm.mq.MQGetMessageOptions;
import com.ibm.mq.MQPutMessageOptions;

/**
 * 
 * Handler Interface
 * @author pluser
 * @version 1.0
 * @date 2014-05-03
 * @modifiedHis
 *
 * @description
 * MQ handler interface, define put and get method
 */
public interface IHandler {

	/**
	 * put msg into queue with pmo put options 
	 * @param msgBytes byte of message
	 * @param pmo put message option
	 * @throws IOException
	 * @throws MQException
	 */
	public void putMsg(byte[] msgBytes, MQPutMessageOptions pmo)
			throws IOException, MQException;
	
	/**
	 * get message from queue with gmo get options
	 * @param gmo get message options
	 * @return
	 * @throws IOException
	 * @throws MQException
	 */
	public byte[] getMsg(MQGetMessageOptions gmo) 
			throws IOException, MQException;
}
